﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace Spacer
{
    public class CreditsScreen : Activity
    {
        public void Initialize()
        {

        }

        public void Paused()
        {

        }

        public void Resumed()
        {

        }

        public void Shutdown()
        {
        }

        public void Update()
        {
            if ((Input.IsKeyDown(Keys.Enter) && !Input.WasKeyDown(Keys.Enter)) ||
                (Input.IsGamePadButtonDown(GamePadButton.B) && !Input.WasGamePadButtonDown(GamePadButton.B)))
                m_bFinished = true;

        }

        public void DrawWorld()
        {
        }

        public void DrawOverlay()
        {


            //Draw Black Background, or BLACKGROUND!
            Surface.DrawColor = Color.Black;
            Surface.DrawRect(Vector2.Zero, new Vector2(Surface.Width, Surface.Height), Vector2.Zero, 0f, Layer.LAYER_20);

            Surface.DrawColor = Color.Yellow;
            Surface.DrawString("Orbitronio","Credits", new Vector2(Surface.Width / 3 - 200, 50), new Vector2(0, 0), 0f);
            Surface.DrawColor = Color.OrangeRed;
            Surface.DrawString("DefaultLarge", "Designers/Programmers", new Vector2(Surface.Width / 8, Surface.Height/4), Vector2.Zero, 0f);
            Surface.DrawString("DefaultLarge", "Graphics", new Vector2(Surface.Width / 8, Surface.Height / 2), Vector2.Zero, 0f);
            Surface.DrawColor = Color.CornflowerBlue;
            Surface.DrawString("Default", "Christopher O'brien\nAndrew Powers\nCory Zinkiewicz", new Vector2(Surface.Width / 8, Surface.Height / 3), Vector2.Zero, 0f);
            Surface.DrawString("Default", "Nicholas Joniak", new Vector2(Surface.Width / 8, Surface.Height / 2+50), Vector2.Zero, 0f);
        }

        public bool IsModal()
        {
            return true;
        }

        public bool IsTransparent()
        {
            return true;
        }

        public bool IsFinished()
        {
            return m_bFinished;
        }

        // ----------

        bool m_bFinished;
    }
}
